<?php
/*
 * @Author: your name
 * @Date: 2021-10-09 14:12:21
 * @LastEditTime: 2021-11-09 10:38:14
 * @LastEditors: 乔
 * @Description: In User Settings Edit
 * @FilePath: \tp30\app\admin\controller\Vip.php
 */

namespace app\admin\controller;

use app\BaseController;
use think\facade\Db;
use think\facade\View;

class Vip extends BaseController
{
    public function vipAdd()
    {
        return view();
    }
    public function vipList()
    {
        $keywords = input('keywords', '');
        $where = [];

        $city = \yupoxiong\region\facade\Region::getProvince();
        echo '<pre>';
        echo print_r($city->toArray());
        echo '<pre/>';
        if ($keywords) $where['keywords'] = $keywords;
        //$where['sex'] = 1;
        //一
        //$obj = new \app\admin\model\User();
        //$list = $obj->getUser();

        //二
        $list = \app\admin\model\User::getUserList($where);

        //三
        // $list = \app\admin\model\User::paginate(5);
        // $list=Db::name('user')->paginate(5);
        View::assign('list', $list);

        // echo '<pre>';
        // echo print_r($list);
        // echo '<pre/>';
        return view();
    }
}
